<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <button @click="getClick">切换</button>
  <h1 v-if="isShow" id="if">{{message}}</h1>
  <h1 v-show="isShow" id="show">{{message}}</h1>
</div>

<script src="../js/vue.js"></script>
<script>
  //let(变量)和const(常量)
  const app = new Vue({
    el: '#app',
    data: {
      message: '中国牛蛙！',
      isShow: true
    },
    methods: {
      getClick() {
        this.isShow = !this.isShow;
      }
    }
  })
</script>

</body>
</html>